package com.tanhua.dubbo.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tanhua.dubbo.mappers.AnnouncementMapper;
import com.tanhua.model.domain.mysql.Announcement;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author lk
 * @date 2022-03-31
 */
@DubboService
public class AnnouncementApiImpl implements AnnouncementApi {
    @Autowired
    private AnnouncementMapper announcementMapper;

    @Override
    public Page<Announcement> findAll(Integer page, Integer pagesize) {


        Page<Announcement> page1 = new Page<>(page,pagesize);
        Page<Announcement> announcementPage = announcementMapper.selectPage(page1, null);
        return announcementPage;
    }
}
